<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddColumnIsFinalInVersionTable extends AbstractMigration
{
    public function up()
    {
        $this->table('version')
            ->addColumn('is_final', 'enum', ['values' => 'yes,no', 'default' => 'yes', 'null' => false, 'comment' => '是否最终版'])
            ->save();
    }

    public function down()
    {
        $this->table('version')->removeColumn('is_final')->save();
    }
}
